package org.spring.bean.factory.support;

import lombok.Getter;
import lombok.Setter;
import org.spring.core.io.DefaultResourceLoader;
import org.spring.core.io.ResourceLoader;
import org.tool.reflect.ClassLoaderUtil;

/**
 * AbstractBeanDefinitionReader
 *
 * @author 李坤
 * @date 2022/4/23 12:48
 */
@Getter
@Setter
public abstract class AbstractBeanDefinitionReader implements BeanDefinitionReader {

    protected ClassLoader classLoader;

    protected ResourceLoader resourceLoader;

    protected BeanDefinitionRegistry beanDefinitionRegistry;

    public AbstractBeanDefinitionReader(BeanDefinitionRegistry beanDefinitionRegistry) {
        this.beanDefinitionRegistry = beanDefinitionRegistry;

        this.resourceLoader = new DefaultResourceLoader();
        this.classLoader = ClassLoaderUtil.getDefaultClassLoader();
    }

}
